<!-- createdb.php -->
  
  <?php
  
  $link = mysql_connect('localhost:3306', 'root', '');
  if (!$link){
  die('no connection');
  }
  echo 'Connected successfully1';
  $sql = 'CREATE DATABASE shapes_colors';
  if (mysql_query($sql, $link)) {
      echo "Database my_db created successfully\n";
  } else {
      echo 'Error creating database: ' . mysql_error() . "\n";
  }
  $db_selected = mysql_select_db('shapes_colors', $link);
  if (!$db_selected) {
      die ('Can\'t use shapes-colors : ' . mysql_error());
  }
  $sql = 'CREATE TABLE shapes (id INT(10) PRIMARY KEY AUTO_INCREMENT, row_shapes VARCHAR(25));';
  if (mysql_query($sql, $link)) {
      echo "can't create table\n";
  } else {
      echo 'Error creating database: ' . mysql_error() . "\n";
  }
  
  
  $sql = 'CREATE TABLE shapes (id INT(10) PRIMARY KEY AUTO_INCREMENT, row_shapes VARCHAR(25)';
  echo mysql_query($sql, $link);
  $sql = 'CREATE TABLE colors (id INT(10) PRIMARY KEY AUTO_INCREMENT, row_colors VARCHAR(25))';
  if (mysql_query($sql, $link)){};
  $sql = 'CREATE TABLE colors_shapes (shapes_id INT(10), colors_id INT(10), time TIMESTAMP)';
  if (mysql_query($sql, $link)){};
  echo $sql
  ?>
  
 
